<!--************************************************************************************************-->
<!-- < thesisList.php >                                                                               -->
<!-- Copyright (c) 2012-2013 San Yat-sun University School of Software                              -->
<!-- Founder : Xiaofen Huang                                                                        -->
<!-- Stu : 10389169                                                                                 -->
<!-- Destription : 主页上的最新论文点进来之后论文列表           -->
<!-- Version : 2.1                                                                                  -->
<!--************************************************************************************************-->


<!DOCTYPE html>

<?php
	include_once("header.php");
	//include_once("bottom.php");
	include_once("../manager/ThesisManager.php");
	include_once("../manager/DescriptionManager.php");
	
	$flag = 0;
	if (isset($_REQUEST['description'])){
		$flag = 1;
		$description = $_REQUEST['description'];
		$thesis_names = DescriptionManager::getInstance()->getNThesesByDescription($description, 5);
	}
	else {
		$thesis_names = ThesisManager::getInstance()->getThesisnames(5);
	}
?>
<html lang="zh-hk">

<head>

	<title>Tiny bOOk</title>
	
	<meta http-equiv="Content-Type" content="text/html charset=UTF-8">
	<meta name="contentType" value="text/html  charset=GBK">
	<meta name="description" content="在这里你可以看到最新发布的书籍，和好友共享对某本书的评论和笔记">
	<meta http-equiv="imagetoolbar" content="no">
	<meta name="viewport" content="width=1036">
	
	<link rel="stylesheet" type="text/css" href="../css/thesisList.css">
</head>
<body>

	<div id="left"><!-- 显示论文列表-->
	<?php
		if ($flag == 1)
		{
		?>
			<p>论文标签：<?=$description?></p>
		<?php
		}
		for($i = 0; $i < count($thesis_names); $i++)
		{
			$thesis_value = ThesisManager::getInstance()->getValueByThesisname($thesis_names[$i]);

	?>
		<div id="papersright">
			<div id="intro">
				<a href="thesisPage.php?thesis_name=<?=$thesis_names[$i]?>"><?=$thesis_names[$i]?></a>
				<p>作者:<?=$thesis_value['AuthorName']?></p>
				<pre><?=$thesis_value['Content']?><pre>
			</div>
		</div><!--end of thesis list-->
	<?php
	}
	?>
	</div><!--end of left-->
</body>
</html>